package com.example.forum2.exception;

import com.example.forum2.comment.AppResult;

public class ApplicationExeception extends RuntimeException {
    protected AppResult errorResult;

    public AppResult getErrorResult() {
        return errorResult;
    }
    public ApplicationExeception(AppResult errorResult){
        super(errorResult.getMessage());
        this.errorResult=errorResult;
    }

    public void setErrorResult(AppResult errorResult) {
        this.errorResult = errorResult;
    }

    public ApplicationExeception() {
        super();
    }

    public ApplicationExeception(String message, Throwable cause) {
        super(message, cause);
    }

    public ApplicationExeception(String message) {
        super(message);
    }

    public ApplicationExeception(Throwable cause) {
        super(cause);
    }

    protected ApplicationExeception(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
